package cn.wusifx.zabbix.request.builder.maintenance;

import cn.wusifx.zabbix.request.BaseRequest;
import cn.wusifx.zabbix.request.builder.UpdateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/maintenance/update
 */
public class MaintenanceUpdateRequestBuilder extends UpdateRequestBuilder {
    private String maintenanceId;
    public MaintenanceUpdateRequestBuilder(String auth) {
        super("maintenance.update", auth);
    }

    public MaintenanceUpdateRequestBuilder(Long id, String auth) {
        super("maintenance.update", id, auth);
    }

    public String getMaintenanceId() {
        return maintenanceId;
    }

    public MaintenanceUpdateRequestBuilder setMaintenanceId(String maintenanceId) {
        this.maintenanceId = maintenanceId;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("maintenanceid",maintenanceId);
        return baseRequest;
    }
}
